--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Node / ReticulumProjects / MeshChatX.git / files / android / app / src / main / python / able / __init__.py
Displaying Raw • Download
android/app/src/main/python/able/__init__.py e0f1f99cd1c208c5008a936230c38e448dddd45d (e0f1f99c) Text, 796 B
T8b949e# SPDX-License-Identifier: MIT
T8b949e"""Minimal Android BLE stack for RNS RNodeInterface on Chaquopy.
API-compatible with the subset of able that Reticulum's Android
RNodeInterface imports. Uses org.able.BLE (Java) plus Chaquopy proxies
instead of Kivy / pyjnius.
"""
Tff7b72from T7ee787__future__ Tff7b72import Te6edf3annotations
Tff7b72from T7ee787ableT7ee787.T7ee787structures Tff7b72import Te6edf3AdvertisementTb4b4b4, Te6edf3Services
Te6edf3GATT_SUCCESS Tff7b72= T79c0ff0
Te6edf3STATE_CONNECTED Tff7b72= T79c0ff2
Te6edf3STATE_DISCONNECTED Tff7b72= T79c0ff0
Te6edf3__all__ Tff7b72= Tb4b4b4[
Ta5d6ff"Ta5d6ffGATT_SUCCESSTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffSTATE_CONNECTEDTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffSTATE_DISCONNECTEDTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffAdvertisementTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffBluetoothDispatcherTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffServicesTa5d6ff"Tb4b4b4,
Tb4b4b4]
Tff7b72def Tff7b72__getattr__Tb4b4b4(Te6edf3nameTb4b4b4: Tffa657strTb4b4b4)Tb4b4b4:
Tff7b72if Te6edf3name Tff7b72== Ta5d6ff"Ta5d6ffBluetoothDispatcherTa5d6ff"Tb4b4b4:
Tff7b72from T7ee787ableT7ee787.T7ee787dispatcher Tff7b72import Te6edf3BluetoothDispatcher
Tff7b72return Te6edf3BluetoothDispatcher
Tff7b72raise Tf85149AttributeErrorTb4b4b4(Ta5d6fffTa5d6ff"Ta5d6ffmodule Tffd700{Tff7b72__name__Tffd700!r}Ta5d6ff has no attribute Tffd700{Te6edf3nameTffd700!r}Ta5d6ff"Tb4b4b4)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────